package com.viewsky.base.back.bean;

import java.io.Serializable;

import com.viewsky.base.back.util.Converter;

@SuppressWarnings("serial")
public class LoginUser implements Serializable
{
	private String userId;
	private String password;
	private String userName;
	private String orgId;	
	private String roleId;
	private String clientIp;
	
	public LoginUser()
	{
		
	}
	
	public LoginUser(String userId, String userName,
			String orgId, String roleId)
	{
		this.userId = userId;
		this.userName = userName;
		this.orgId = orgId;		
		this.roleId = roleId;
	}

	public LoginUser(LoginUser loginUser)
	{
		this.userId = loginUser.getUserId();
		this.password = loginUser.getPassword();
		this.userName = loginUser.getUserName();
		this.orgId = loginUser.getOrgId();		
		this.roleId = loginUser.getRoleId();
		this.clientIp = loginUser.getClientIp();
	}
	
	public String getUserId()
	{
		return userId;
	}
	public void setUserId(String userId)
	{
		this.userId = userId;
	}
	
	public String getPassword()
	{
		return password;
	}
	public void setPassword(String password)
	{
		this.password = password;
	}
	
	public String getUserName()
	{
		return userName;
	}
	public void setUserName(String userName)
	{
		this.userName = userName;
	}
	
	public String getOrgId()
	{
		return orgId;
	}
	public void setOrgId(String orgId)
	{
		this.orgId = orgId;
	}
	
	public String getRoleId()
	{
		return roleId;
	}
	public void setRoleId(String roleId)
	{
		this.roleId = roleId;
	}
	
	public String getClientIp()
	{
		return clientIp;
	}
	public void setClientIp(String clientIp)
	{
		this.clientIp = clientIp;
	}

	@Override
	public String toString()
	{
		String strJsonData = "";
		
		try
		{
			strJsonData = Converter.toJson(this);
		} 
		catch (Exception e)
		{
			strJsonData = super.toString();
		}
		
		return strJsonData;
	}
}
